echo_full_line() {
    local char="${1:-=}"  # 默认使用 = ，你也可以传入其他字符比如 - * 等
    printf '%*s\n' "$(tput cols)" | tr ' ' "$char"
}

echo_full_line
echo_full_line
echo_full_line
echo " *****安装软件说明*****"
echo " 1. 更新软件包索引"
echo " 2. 安装openssh-server"
echo " 3. 安装c/c++相关"
echo " 4. 安装调试等工具"
echo " 5. 安装zsh & oh my zsh"
echo " 6. 小工具"
echo_full_line
echo_full_line
echo_full_line

echo "如果阅读完毕，请按回车"

read input

echo_full_line
echo " 1. 更新软件包索引"
echo_full_line

sudo apt update

echo_full_line
echo " 2. 安装openssh-server"
echo_full_line

sudo apt install openssh-server

echo_full_line
echo " 3. 安装c/c++相关"
echo_full_line

sudo apt install -y \
    cmake \
    gcc \
    g++ \
    make \
    libncurses5-dev \
    libssl-dev \
    bison \
    libaio-dev \
    libtinfo-dev \
    zlib1g-dev \
    pkg-config

echo_full_line
echo " 4. 安装调试等工具"
echo_full_line

sudo apt install -y \
    gdb \
    valgrind \
    strace \
    ltrace

echo_full_line
echo " 5. 安装zsh & oh my zsh"
echo_full_line

sudo apt install -y \
  git \
	zsh

curl -fsSL https://gitee.com/pocmon/ohmyzsh/raw/master/tools/install.sh | sh

# 由于这里切换终端，会导致它以后的命令不执行，所以放在最后
chsh -s /bin/zsh

echo_full_line
echo " 6. 小工具"
echo_full_line

sudo apt install -y \
	vim \
	lrzsz

apt install open-vm-tools open-vm-tools-desktop

# 由于这里切换终端，会导致它以后的命令不执行，所以放在最后
zsh



